﻿using XinLife.Model;
using XinLife.Model.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XinLife.Core.Model;
using Microsoft.AspNetCore.Mvc;

namespace XinLife.Application.Interface
{
    public interface IModuleService
    {
        Task<List<Module>> GetUserModule(string userId, bool isAdmin = false);
        Task<List<ModuleButton>> GetUserModuleButtons(string userId, bool isAdmin = false);

        Task<List<ModuleOutputDto>> GetUserMenu(string userId, bool isAdmin = false);
        Task<Dictionary<string, List<string>>> GetUserMenuButtons(string userId, bool isAdmin = false);

        Task<PageData<ModuleOutputDto>> GetModulePageListAsync(Pagination page, string queryJson);
        Task<List<Module>> GetParentIdModule();
        Task<AjaxResult> GetModuleById(string id);
        Task<PageData<ModuleButton>> GetModuleButtonPageList(Pagination page, string queryJson);

        Task<AjaxResult> EditModuleButton(ModuleButton moduleButton);
        Task<AjaxResult> GetModuleButtonById(string id);
        Task<AjaxResult> GetModuleRoles(string moduleId,string buttonIds);
        Task<AjaxResult> GetRoleModules(string moduleId, string roleIds);

        Task<AjaxResult> ButtonsRoleAuth(ButtonsAuthInputDto dto);
        Task<AjaxResult> EditModuleAsync(Module module);
        Task<AjaxResult> DelModuleButton(string ids);

        Task<AjaxResult> DelModuleAsync(string ids);
    }
}
